<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>

        
        function imitateClick(oElement, iClientX, iClientY) {
            var oEvent;
            if (document.createEventObject) { //For IE
                oEvent = document.createEventObject();
                oEvent.clientX = iClientX;
                oEvent.clientY = iClientY;
                oElement.fireEvent("onclick", oEvent);
            } else {
                oEvent = document.createEvent("MouseEvents");
                oEvent.initMouseEvent("click", true, true, document.defaultView, 0, 0, 0,
                    iClientX, iClientY/*, false, false, false, false, 0, null*/);
                oElement.dispatchEvent(oEvent);
            }
        }

        var body = document.body;

        body.onclick = function (event) {
            alert("clicked at (" + event.clientX + "," + event.clientY + ")");
        };


        imitateClick(body, 100, 100);
    </script>
</body>

</html>